1. Reasons for a long-time executed queryLong-time queries due to poor SQL execution efficiency:Long queries caused by SQL injection:Because DDL statements cause table metadata lock waits:2. Problems caused by long-time queriesIn general, queries
1. View MySQL server configuration informationMysql> Show variables;2. View the various status values running on the MySQL serverMysql> show global status;3, slow query1. mysql> show variables like ‘%slow%‘; 2. +------------------+-------+ 3. |
mysql> show global status; Can list MySQL server running various status values, my personal preferred usage is show status like ' query value% '; One, slow query mysql> show variables like '%slow% '; +------------------+-------+ | variable_name
About MySQL TuningThere are 3 ways to speed up the running of the MySQL server, from low to high efficiency:Replace the problematic hardware.Tuning the MySQL process settings.Optimize the query.
Replacing the problematic hardware is usually our
MySQL performance tuning and Architecture Design-Chapter 1 Performance Design-MySQL Replication and replication Optimization
Chapter 1 scalability design-MySQL Replication
Preface:
MySQL Replication is a unique feature of MySQL. It can completely
Slow sql: Queries that run longer than a given time range are called slow queries.How do I record slow sql in MySQL?A: You can set the following information in MY.CNF:
[Mysqld]
; Enable the slow query log, default
MySQL has a lot of basic commands, and the show command is also one of them. In many users, the use of the show command is also prone to confusion. This article summarizes the many usage of the show command.1. Show tables or show tables from
Excerpt from: http://www.jb51.net/article/33736.htmWith the help of explain, you know when to add an index to the table to use the index to find records and make the select run faster.If some problems arise due to improper use of the index, you can
Welcome to the Linux community forum, and interact with 2 million technical staff to enter the running mysql status to view the running mysql monitoring, one of which is to view the mysql running status. (1) QPS (queries per second) QPSQuestions
Role of the master and slave:
1. It can be used as a backup method.
2. read/write splitting to relieve the pressure on a database
MySQL master-slave backup principle:
Mysql master-slave replication requires at least two Mysql services. Of course,
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.